//
//  GCDTcpSocketManager.h
//  fireplace
//
//  Created by XiangDongMBP on 2017/3/17.
//  Copyright © 2017年 East. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  socket 连接状态
 */
typedef NS_ENUM(NSInteger, GCDSocketConnectStatus) {
    GCDSocketConnectStatusDisconnected = -1,  // 未连接
    GCDSocketConnectStatusConnecting = 0,     // 连接中
    GCDSocketConnectStatusConnected = 1       // 已连接
};

extern NSNotificationName const FIPGCDSocketStatusChanged;  //!< TCP连接状态发生变化
extern NSNotificationName const FIPGCDSyncHotStatus;        //!< 同步加热状态
extern NSNotificationName const FIPGCDSyncRGBStatus;        //!< 同步RGB状态
extern NSNotificationName const FIPGCDSyncRGBMode;          //!< 同步RGB模式

@interface GCDTcpSocketManager : NSObject
// 连接状态
@property (nonatomic, readonly) GCDSocketConnectStatus connectStatus;
// 加热状态(0-关机，停止加热；1-1级加热，最小功率；2-2级加热，中等功率；3-3级加热，最大功率)
@property (nonatomic, readonly) NSInteger hot;
// LED的状态(0-rgb不亮  1-rgb打开)
@property (nonatomic, readonly) BOOL ledOn;
// LED的亮度(0最暗-1-2-3-4-5-6-7-8-9-10最亮)
@property (nonatomic, readonly) NSInteger brightness;
// LED的速度(0最慢-1-2-3-4-5-6-7-8-9-10最快)
@property (nonatomic, readonly) NSInteger speed;
// RGB的Mode(0-静态颜色；1-七彩渐变；2-七彩跳变)
@property (nonatomic, readonly) NSInteger rgbModel;
// RGB的Color
@property (nonatomic, readonly) NSInteger rgbColor;


+ (instancetype)sharedInstance;
- (void)connetToHost;
- (void)disconnet;
- (void)startBeat;
- (void)endBeat;
- (void)configHot:(NSInteger)hot;
- (void)configBrightness:(NSInteger)brightness;
- (void)configSpeed:(NSInteger)speed;
- (void)configRgbMode:(NSInteger)mode rgbColor:(NSInteger)rgbColor;

@end
